package com.efeichong.multiTenant;

/**
 * @author lxk
 * @date 2020/12/29
 * @description 提供多租户id
 */
public class MultiTenantIdHolder {

    private static ThreadLocal<String> context = new ThreadLocal();

    public static String getTenantId() {
        return context.get();
    }

    public static void setTenantId(String tenantId) {
        context.set(tenantId);
    }

    public static void remove() {
        context.remove();
    }

}
